From: Jonas Dreßler Date: Sat, 20 Feb 2021 11:35:06 +0000 (+0100) Subject: keyboard: Allow closing immediately X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~125 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2cf8b93a7b0da5280f26223ccd52388388f46491;p=gnome-shell.git keyboard: Allow closing immediately Just like opening the OSK, make it possible to close it immediately, we'll make use of this in the next commit. Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 023b0484f..22ebb3265 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1798,7 +1798,7 @@ var Keyboard = GObject.registerClass({ this._setEmojiActive(false); } - close() { + close(immediate = false) { this._clearShowIdle(); this._keyboardRequested = false; @@ -1806,6 +1806,12 @@ var Keyboard = GObject.registerClass({ return; this._clearKeyboardRestTimer(); + + if (immediate) { + this._close(); + return; + } + this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, KEYBOARD_REST_TIME, () => {